<!-- 配置车辆弹窗 -->
<template>
  <div>
    <el-dialog
      title="车辆配置"
      :visible.sync="isShowConfig"
      width="30%"
      :before-close="onClose"
    >
      <el-row
        type="flex"
        justify="start"
      >
        <div>配置司机需满足以下条件:</div>
      </el-row>
      <el-row
        type="flex"
        justify="start"
        class="info"
      >
        <span class="car">①车辆信息已完善</span>
        <span>②车辆无未完成运输任务</span>
      </el-row>
      <!-- 按钮 -->
      <template #footer>
        <el-row
          type="flex"
          justify="end"
          class="button"
        >
          <el-button
            size="mini"
            type="danger"
            @click="submit"
          >确定</el-button>
          <el-button
            size="mini"
            @click="onClose"
          >取消</el-button>
        </el-row>
      </template>
    </el-dialog>
  </div>
</template>

<script>
// 根据车辆获取绑定司机
// import { getDriverListByCar } from '@/api/transit'
export default {
  name: 'VehicleConfig',
  props: {
    isShowConfig: {
      type: Boolean,
      default: false
    },
    isShowDriver: {
      type: Boolean,
      required: true
    },
    vehicleConfigId: { type: [String, Number], default: '0' }
  },
  methods: {
    onClose() {
      this.$emit('update:isShowConfig', false)
    },
    submit() {
      this.onClose()
      this.$emit('update:isShowDriver', true)
      this.$emit('arrangeConfig', this.vehicleConfigId)
    }
  }
}
</script>

<style lang="scss" scoped>
.car{
  margin-right: 100px;
}
.info{
  margin-top: 15px;
}
.button{
  margin: 15px 0;
}
</style>
